package com.fr.report.script.function;

import com.fr.base.FRContext;
import com.fr.base.Inter;
import com.fr.report.script.Function;
import com.fr.report.script.Function.Type;
import com.fr.report.script.NormalFunction;
import com.fr.report.script.Primitive;
import com.fr.util.Utils;
import java.util.logging.Level;
import java.util.logging.Logger;

public class I18N extends NormalFunction
{
  public Object run(Object[] paramArrayOfObject)
  {
    if (paramArrayOfObject.length < 1)
      return Primitive.ERROR_NAME;
    try
    {
      return Inter.getLocText(Utils.objectToString(paramArrayOfObject[0]));
    }
    catch (Exception localException)
    {
      FRContext.getLogger().log(Level.WARNING, localException.getMessage(), localException);
    }
    return paramArrayOfObject[0];
  }

  public Function.Type getType()
  {
    return Function.REPORT;
  }

  public String getCN()
  {
    return "";
  }

  public String getEN()
  {
    return "";
  }
}